package com.jhgsys.internal.incentive.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;


/**
 * 安全奖i订单 Entity
 *
 * @author zhangwei
 * @date 2024-09-02 11:28:06
 */
@Data
@TableName("incentive_goods_order")
public class IncentiveGoodsOrder implements Serializable {

    /**
     * 主键
     */
    @TableId(value = "goods_order_id", type = IdType.ASSIGN_UUID)
    @Size(max = 32, message = "{noMoreThan}")
    private String goodsOrderId;

    /**
     * 公司Id
     */
    @TableField("tenant_id")
    @NotBlank(message = "{required}")
    @Size(max = 32, message = "{noMoreThan}")
    private String tenantId;

    /**
     * 订单类型;1：安全奖励 2：线上申请 3：线下兑换
     */
    @TableField("goods_order_type")
    @NotBlank(message = "{required}")
    @Size(max = 2, message = "{noMoreThan}")
    private String goodsOrderType;

    /**
     * 安全奖励申请Id;订单类型为：1时必填
     */
    @TableField("reward_apply_id")
    @Size(max = 32, message = "{noMoreThan}")
    private String rewardApplyId;

    /**
     * 订单编号
     */
    @TableField("order_no")
    @NotBlank(message = "{required}")
    @Size(max = 64, message = "{noMoreThan}")
    private String orderNo;

    /**
     * 订单时间
     */
    @TableField("order_date")
    @NotNull(message = "{required}")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderDate;

    /**
     * 订单积分;0
     */
    @TableField("order_score")
    @NotNull(message = "{required}")
    private Integer orderScore;

    /**
     * 兑换码
     */
    @TableField("exchange_code")
    @NotBlank(message = "{required}")
    @Size(max = 255, message = "{noMoreThan}")
    private String exchangeCode;

    /**
     * 兑换时间
     */
    @TableField("exchange_date")
    @NotNull(message = "{required}")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date exchangeDate;

    /**
     * 订单状态;1：待提交 2：待领取 3：已领取 4：已取消
     */
    @TableField("status")
    @NotBlank(message = "{required}")
    @Size(max = 2, message = "{noMoreThan}")
    private String status;

    /**
     * 新增人
     */
    @TableField("created_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String createdBy;

    /**
     * 新增时间
     */
    @TableField("created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 修改人
     */
    @TableField("updated_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String updatedBy;

    /**
     * 修改时间
     */
    @TableField("updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    /**
     * 删除人
     */
    @TableField("deleted_by")
    @Size(max = 32, message = "{noMoreThan}")
    private String deletedBy;

    /**
     * 删除时间
     */
    @TableField("deleted_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date deletedTime;

    /**
     * 删除标记
     */
    @TableField("deleted_flg")
    @Size(max = 1, message = "{noMoreThan}")
    private String deletedFlg;

}